package reserved

import (
	"hundsun.com/hsl/hschain/contract/jvm/jvm.go/instructions/base"
	"hundsun.com/hsl/hschain/contract/jvm/jvm.go/native"
	"hundsun.com/hsl/hschain/contract/jvm/jvm.go/rtda"
)

// Invoke native method
type InvokeNative struct{ base.NoOperandsInstruction }

func (instr *InvokeNative) Execute(frame *rtda.Frame) {
	method := frame.Method
	// TODO: cache native method
	nativeMethod := native.FindNativeMethod(method)
	nativeMethod(frame)
}
